package ai.people.platform.archives.intimacy;

import ai.people.platform.archives.intimacy.handler.IntimacyHandleService;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author zhenglin
 * @date 2022/7/28
 */
public class IntimacyHandlerFactory {

    private static final Map<String, IntimacyHandleService> MAP = new ConcurrentHashMap<>();

    public static IntimacyHandleService getIntimacyHandler(String type) {
        return MAP.get(type);
    }

    public static void registerIntimacyHandler(String type, IntimacyHandleService handler) {
        MAP.put(type, handler);
    }
}
